<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <title>后台-图书列表</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="author" content="">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <link rel="stylesheet" href="{{ asset('/bootstrap-3.3.5-dist/css/bootstrap.min.css') }}">
    <link rel="stylesheet" href="{{ asset('/style/css/admin.css') }}">
</head>
<body class="docs">
@if (Auth::check()) 

<table class="table table-hover">
   <caption>图书分类：</caption>
   <thead>
      <tr>
         <th>CAT_ID</th>
         <th>分类名字</th>
         <th>排序</th>
      </tr>
   </thead>
   <tbody>
    @foreach ($cats as $cat)
      <tr>
         <td>{{ $cat->cat_id }}</td>
         <td>{{ $cat->cat_name }}</a></td>
         <td>{{ $cat->sort_order }}</td>
         <td>
         <a href="{{ URL('admin/catedit') }}/{{ $cat->cat_id }}">编辑</a><br/>
         <a href="#" onclick="javascript:return p_del()">删除</a>
         </td>
      </tr>
    @endforeach
   </tbody>
</table>
@else
没有登录
@endif

<script language="javascript">
function p_del() {var msg="您真的确定要删除吗？\n\n请确认！";if (confirm(msg)==true){
return true;}else{return false;}}
</script>

</body>
</html>